print('-------> 阶乘及其相加 <------')
print('1!,一的阶乘')
fact = 1
i = 1
while i < 2:
    fact *= i
    i += 1
print('1!=', fact)
print('2!,二的阶乘')
fact2 = 1
i = 1
while i < 3:
    fact2 *= i
    i += 1
print('2!=', fact2)
print('3!,三的阶乘')
n = 1
sum1 = 0
while n < 10:
    i = 1
    factn = 1
    while i < n+1:
        factn *= i
        i += 1
    sum1 += factn
    print('sum1',sum1)
    n += 1
print('-------> 5.14星期二第一随机生成题 <------')
import random
set1 = set()
i = 1
while i<6:
    n = random.randint(1,10)
    set1.add(n)
    if len(set1)==5:
        print(set1)
    i+=1
print('-------> 5.14星期二第二双色球题 <------')
import random
list_a = [x for x in range(1,34)]
res_list = []
for i in range(0,6):
    random_index = random.randint(0,33-i)
    temp = list_a.pop(random_index)
    res_list.append(temp)
print(res_list)
print('-------> 5.14星期二第三题逢7就过 <------')
for a in range(1,51):
    if a%7 == 0 or a%10==7:
        continue
        a+=1
    print(a)
print('-------> 5.14星期二第四题打印100以内整数 <------')
for i in range(1,101):
    print(i)
print('-------> 5.14星期二第五题打印100以内奇数 <------')
for i in range(1,101):
    if i%2==0:
        continue
    print(i)
    i+=1
print('-------> 5.14星期二第六题打印1-100的和 <------')
sum1 = 0
i = 1
while i < 101:
    sum1 += i
    i += 1
print(sum1)
print('-------> 5.14星期二第七题打印1-100奇数的和 <------')
sum1 = 0
i = 1
while i < 101:
    sum1 += i
    i += 2
print(sum1)
print('-------> 5.14星期二第九题打印所有水仙花数 <------')
print('水仙花数为三位数,各个位上的数立方相加等于水仙花数本身')
for n in range(100,1000):
    if (n%10)**3+(n%100//10)**3+(n//100)**3==n:
        print(n)
print('-------> 5.14星期二第十题百元白鸡问题 <------')
print('公鸡3元,母鸡1元,小鸡1元3个,100块买100只鸡')
print('-------> 5.14星期二第十一题打印99乘法表 <------')
n = 10
for i in range(1,n):
    for j in range(1,i+1):
        print('%d * %d = %d' % (j,i,i*j),end=' ')
    print()
print('-------> 5.14星期二第十二题 <------')


    

    
        
    
        
        
    

    
